#include <iostream>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
 
using namespace std;
typedef long long ll;

const double eps=1e-10;
struct point { double x, y; }p[10];
double min(double a, double b) { return a < b ? a : b; }
double max(double a, double b) { return a > b ? a : b; }
bool inter(point a, point b, point c, point d){
	if ( min(a.x, b.x) > max(c.x, d.x) ||
	 min(a.y, b.y) > max(c.y, d.y) ||
	 min(c.x, d.x) > max(a.x, b.x) ||
	 min(c.y, d.y) > max(a.y, b.y) ) return 0;
	double h, i, j, k;
	 h = (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
	 i = (b.x - a.x) * (d.y - a.y) - (b.y - a.y) * (d.x - a.x);
	 j = (d.x - c.x) * (a.y - c.y) - (d.y - c.y) * (a.x - c.x);
	 k = (d.x - c.x) * (b.y - c.y) - (d.y - c.y) * (b.x - c.x);
	return h * i <= eps && j * k <= eps;
} 

int main(){
	p[0].x = 1; p[0].y = 1;
	p[1].x = 2; p[1].y = 1;
	p[2].x = 0; p[2].y = 7;
	p[3].x = 8; p[3].y = 8;
	if(inter(p[0], p[3], p[1], p[2])){
		printf("yes\n");
	}
}
